Skip to content

[ADT] Fix a comment typo in SmallPtrSet (NFC) #152565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kazutakahirata
Copy link
Contributor

In the large mode, SmallPtrSet uses quadratic probing with ProbeAmt++
just like DenseMap.

In the large mode, SmallPtrSet uses quadratic probing with ProbeAmt++
just like DenseMap.
@llvmbot
Copy link
Member

llvmbot commented Aug 7, 2025

@llvm/pr-subscribers-llvm-adt

Author: Kazu Hirata (kazutakahirata)

Changes

In the large mode, SmallPtrSet uses quadratic probing with ProbeAmt++
just like DenseMap.


Full diff: https://github.com/llvm/llvm-project/pull/152565.diff

1 Files Affected:

  • (modified) llvm/include/llvm/ADT/SmallPtrSet.h (+1-1)
diff --git a/llvm/include/llvm/ADT/SmallPtrSet.h b/llvm/include/llvm/ADT/SmallPtrSet.h
index 892040ef4cab1..d49ef1d4fbc57 100644
--- a/llvm/include/llvm/ADT/SmallPtrSet.h
+++ b/llvm/include/llvm/ADT/SmallPtrSet.h
@@ -46,7 +46,7 @@ namespace llvm {
 /// sets are often small.  In this case, no memory allocation is used, and only
 /// light-weight and cache-efficient scanning is used.
 ///
-/// Large sets use a classic exponentially-probed hash table.  Empty buckets are
+/// Large sets use a classic quadratically-probed hash table.  Empty buckets are
 /// represented with an illegal pointer value (-1) to allow null pointers to be
 /// inserted.  Tombstones are represented with another illegal pointer value
 /// (-2), to allow deletion.  The hash table is resized when the table is 3/4 or

@kazutakahirata kazutakahirata merged commit 77c7931 into llvm:main Aug 7, 2025
11 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250807_SmallPtrSet_typo branch August 7, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants